package dnl.dtools.grm;

public class TypePair {

	private Class<?> type1;

	private Class<?> type2;

	public TypePair(Class<?> type1, Class<?> type2) {
		super();
		this.type1 = type1;
		this.type2 = type2;
	}

	public Class<?> getType1() {
		return type1;
	}

	public void setType1(Class<?> type1) {
		this.type1 = type1;
	}

	public Class<?> getType2() {
		return type2;
	}

	public void setType2(Class<?> type2) {
		this.type2 = type2;
	}

	@Override
	public boolean equals(Object obj) {
		if (!(obj instanceof TypePair))
			return false;
		TypePair other = (TypePair) obj;
		return other.type1.equals(this.type1) && other.type2.equals(this.type2);
	}

	@Override
	public int hashCode() {
		return type1.hashCode() ^ type2.hashCode();
	}

}
